package cn.fl.riskctrl.service;

import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.riskctrl.vo.RcCstBscInfoVO;
import fl.riskctrl.facade.riskctrl.condition.RcCstBscInfoQC;
import fl.riskctrl.facade.riskctrl.dto.DataResultDTO;

import java.util.List;
import java.util.Map;

/**
 * @Description: 风险控制客户基础信息表 客户端服务层接口
 * @Description: 持久层方法名称前缀：新增：insert* 删除：delete* 修改：update* 批量：batch* 查询对象：select* get* find* 查询集合：select*
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
public interface IRcCstBscInfoService {
	
	/**
	 * 获取唯一对象
	 * @param id 主键
	 * @return 对象DTO
	 */
	public RcCstBscInfoVO selectById(Long id)throws BaseException;
	
	/**
	 * 新增
	 * @param entity
	 * @return
	 */
    public Long add(RcCstBscInfoVO entity) throws BaseException;

    /**
     * 删除
     * @param id
     * @return
     */
    public boolean removeById(Long id)throws BaseException;
    
    /**
     * 删除
     * @param ids
     * @return
     */
    public boolean removeByIds(List<Long> ids)throws BaseException;

    /**
     * 修改
     * @param entity
     * @return
     */
    public boolean modify(RcCstBscInfoVO entity, String flag)throws BaseException;

    /**
     * 分页查询所有
     * @param page
     * @return
     */
    public Pager searchListPage(Pager page)throws BaseException;

	/**
	 * 导出征信记录
	 * @param qc
	 * @return
	 */
	public String exportRcCstBscInfo(RcCstBscInfoQC qc, String sysCd, String orgCd)throws BaseException;

	/**
	 * 导出前置征信详情
	 * @param qc
	 * @param sysCd
	 * @param orgCd
	 * @return
	 * @throws BaseException
	 */
	public String exportRcCstBscInfoDetail(RcCstBscInfoQC qc, String sysCd, String orgCd)throws BaseException;
	
	/**
	 * 根据客户ID集合审核客户信息
	 * @param cstIdList 客户ID集合
	 * @param allIsDl 是否是所有死亡数据
	 * @return 是否执行完成,执行完成的不一定都审核完成
	 * @throws BaseException
	 */
	public void syncRcCstBscInfoAudSts(List<Long> cstIdList, boolean allIsDl) throws BaseException;

	/**
	 * 根据客户id获取征信信息
	 * @param cstId
	 * @return
	 * @throws BaseException
	 */
	public DataResultDTO getRiskCtrlIsCorrect(Long cstId) throws BaseException;

	/**
	 * 根据客户id获取征信信息
	 * @param cstId
	 * @return
	 * @throws BaseException
	 */
	public DataResultDTO checkZZCIsCorrect(Long cstId) throws BaseException;

	/**
	 * 根据客户id获取征信信息
	 * @param cstId
	 * @return
	 * @throws BaseException
	 */
	public DataResultDTO checkXjIsCorrect(Long cstId) throws BaseException;

	/**
	 * 根据客户id获取征信信息
	 * @param cstId
	 * @return
	 * @throws BaseException
	 */
	public DataResultDTO checkSynthMobileIsCorrect(Long cstId) throws BaseException;

	/**
	 * 根据客户id获取征信信息
	 * @param cstId
	 * @return
	 * @throws BaseException
	 */
	public DataResultDTO checkSynthScoreIsCorrect(Long cstId) throws BaseException;
	
	/**
	 * 专车·客车：百融案件
	 * @param cstId
	 * @return
	 * @throws BaseException
	 */
	public DataResultDTO checkKcBadInfoIsCorrect(Long cstId) throws BaseException;
	
	/**
	 * 获取客户最新的征信信息 limit 1
	 * @param CstMgrBuOrgCd 客户经理事业部代码
	 * @param prjTypCd 项目类型
	 * @param certNo 身份证号
	 * @return
	 * @throws BaseException
	 */
	public Map<String, String> selectCstInfoLimitOne(String cstMgrBuOrgCd,String prjTypCd,String certNo) throws BaseException;
	/**
	 * 单独检查鹏元建议征信是否正常
	 * @param cstId 客户主键
	 * @throws BaseException
	 */
	public DataResultDTO checkPYJyIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检查鹏元驾照征信是否正常
	 * @param cstId 客户主键
	 * @throws BaseException
	 */
	public DataResultDTO checkPYJzIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检查鹏元征信是否正常
	 * @throws BaseException
	 */
	public DataResultDTO checkKJYIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检查鹏元征信是否正常
	 * @throws BaseException
	 */
	public DataResultDTO checkSYSIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检查鹏元征信是否正常
	 * @throws BaseException
	 */
	public DataResultDTO checkPyEduIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检查鹏元分
	 * @throws BaseException
	 */
	public DataResultDTO checkPyscrIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检查聚信立征信是否正常
	 * @throws BaseException
	 */
	public DataResultDTO checkJXLIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检百融征信是否正常
	 * @throws BaseException
	 */
	public DataResultDTO checkBrIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检百融不良信息
	 * @throws BaseException
	 */
	public DataResultDTO checkBrblIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检百融个人信息关联
	 * @throws BaseException
	 */
	public DataResultDTO checkBrPersonIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检百融手机核查
	 * @throws BaseException
	 */
	public DataResultDTO checkBrtelIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检同盾手机核查
	 * @throws BaseException
	 */
	public DataResultDTO checkTdtelIsCorrect(Long cstId) throws BaseException;

	/**
	 * 单独检同盾征信是否正常
	 * @return id 业务主键
	 * @throws BaseException
	 */
	public DataResultDTO checkTDIsCorrect(Long cstId) throws BaseException;

	/**
	 * 获取客户基本信息及详细关系信息
	 * @param id 客户ID
	 * @return 包含客户关系的客户对象
	 * @throws BaseException
	 */
	public RcCstBscInfoVO getCstBscInfoById(Long id) throws BaseException;

	/**
	 * 查人行征信（小贷）
	 * @return
	 * @throws BaseException
	 */
	public boolean getRhAudSts() throws BaseException;

	/**
	 * 查三方征信（小贷）
	 * @return
	 * @throws BaseException
	 */
	public boolean getThdAudSts() throws BaseException;
	
	/**
	 * 批量生产征信授权书
	 * @param cstId
	 * @param ip
	 * @return
	 * @throws BaseException
	 */
	Boolean batchGenerateAuthorization(List<String> cstId,String ip) throws BaseException;
	/**
	 * 批量发送短息
	 * @param cstId
	 * @return
	 * @throws BaseException
	 */
	Boolean batchSendMassage(List<String> cstId) throws BaseException;

    /**
     * 获取手机Report
     * @param cstId
     * @return
     * @throws BaseException
     */
    public DataResultDTO getMPReportInfo(Long cstId,String reportType) throws BaseException;

/**
* 获取信加本地规则
 * @methodName getXjLocalDataBaseIsCorrectData
 * @author: fuhaiyan@lionbridgecapital.cn
 * @createDate: 2019/5/28 20:34
 * @version: V1.0.0
 * @param cstId
 * @Return fl.riskctrl.facade.riskctrl.dto.DataResultDTO
 * @updateRemark [序号][YYYY-MM-DD] [更改人姓名][变更描述]
 */
    public DataResultDTO getXjLocalDataBaseIsCorrectData(Long cstId) throws BaseException;
}
